import request from '@/utils/request';
export function getBrands(data) {
  return request({
    url: '/brand/v1/brand-service/brands',
    method: 'post',
    data
  });
}

//修改状态
export function updateBrandStatus(brandId, status) {
  return request({
        url: '/brand/v1/brand-service/brand',
        method: 'put',
        params: {
          brandId,
          status
        }
      }
  );
}
//删除品牌
export function deleteBrand(brandId) {
  return request({
    url: '/brand/v1/brand-service/brand',
    method: 'delete',
    params: {
      brandId
    }
  });
}
//回显品牌信息
export function getBrandInfo(brandId) {
  return request({
    url: `/brand/v1/brand-service/brandById/${brandId}`,
    method: 'get',

  });
}
//更新 brand
export function updateBrand(data) {
  return request({
    url: '/brand/v1/brand-service/update_brand',
    method: 'post',
    data
  });
}
// 新增品牌
export function addBrand(formData) {
  return request({
    url: '/brand/v1/brand-service/add-brand',
    method: 'post',
    data: formData,
    headers: {
      'Content-Type': 'multipart/form-data',
    },
  });
}